// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file arrays_and_sequences.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef FAST_DDS_GENERATED__ARRAYS_AND_SEQUENCES_HPP
#define FAST_DDS_GENERATED__ARRAYS_AND_SEQUENCES_HPP

#include <array>
#include <cstdint>
#include <utility>
#include <vector>


#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(ARRAYS_AND_SEQUENCES_SOURCE)
#define ARRAYS_AND_SEQUENCES_DllAPI __declspec( dllexport )
#else
#define ARRAYS_AND_SEQUENCES_DllAPI __declspec( dllimport )
#endif // ARRAYS_AND_SEQUENCES_SOURCE
#else
#define ARRAYS_AND_SEQUENCES_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define ARRAYS_AND_SEQUENCES_DllAPI
#endif // _WIN32

/*!
 * @brief This class represents the structure AnInternalObject defined by the user in the IDL file.
 * @ingroup arrays_and_sequences
 */
class AnInternalObject
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport AnInternalObject()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~AnInternalObject()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object AnInternalObject that will be copied.
     */
    eProsima_user_DllExport AnInternalObject(
            const AnInternalObject& x)
    {
                    m_x = x.m_x;

                    m_positive = x.m_positive;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object AnInternalObject that will be copied.
     */
    eProsima_user_DllExport AnInternalObject(
            AnInternalObject&& x) noexcept
    {
        m_x = x.m_x;
        m_positive = x.m_positive;
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object AnInternalObject that will be copied.
     */
    eProsima_user_DllExport AnInternalObject& operator =(
            const AnInternalObject& x)
    {

                    m_x = x.m_x;

                    m_positive = x.m_positive;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object AnInternalObject that will be copied.
     */
    eProsima_user_DllExport AnInternalObject& operator =(
            AnInternalObject&& x) noexcept
    {

        m_x = x.m_x;
        m_positive = x.m_positive;
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x AnInternalObject object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const AnInternalObject& x) const
    {
        return (m_x == x.m_x &&
           m_positive == x.m_positive);
    }

    /*!
     * @brief Comparison operator.
     * @param x AnInternalObject object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const AnInternalObject& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function sets a value in member x
     * @param _x New value for member x
     */
    eProsima_user_DllExport void x(
            float _x)
    {
        m_x = _x;
    }

    /*!
     * @brief This function returns the value of member x
     * @return Value of member x
     */
    eProsima_user_DllExport float x() const
    {
        return m_x;
    }

    /*!
     * @brief This function returns a reference to member x
     * @return Reference to member x
     */
    eProsima_user_DllExport float& x()
    {
        return m_x;
    }


    /*!
     * @brief This function sets a value in member positive
     * @param _positive New value for member positive
     */
    eProsima_user_DllExport void positive(
            bool _positive)
    {
        m_positive = _positive;
    }

    /*!
     * @brief This function returns the value of member positive
     * @return Value of member positive
     */
    eProsima_user_DllExport bool positive() const
    {
        return m_positive;
    }

    /*!
     * @brief This function returns a reference to member positive
     * @return Reference to member positive
     */
    eProsima_user_DllExport bool& positive()
    {
        return m_positive;
    }



private:

    float m_x{0.0};
    bool m_positive{false};

};
/*!
 * @brief This class represents the structure arrays_and_sequences defined by the user in the IDL file.
 * @ingroup arrays_and_sequences
 */
class arrays_and_sequences
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport arrays_and_sequences()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~arrays_and_sequences()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object arrays_and_sequences that will be copied.
     */
    eProsima_user_DllExport arrays_and_sequences(
            const arrays_and_sequences& x)
    {
                    m_unlimited_vector = x.m_unlimited_vector;

                    m_limited_vector = x.m_limited_vector;

                    m_limited_array = x.m_limited_array;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object arrays_and_sequences that will be copied.
     */
    eProsima_user_DllExport arrays_and_sequences(
            arrays_and_sequences&& x) noexcept
    {
        m_unlimited_vector = std::move(x.m_unlimited_vector);
        m_limited_vector = std::move(x.m_limited_vector);
        m_limited_array = std::move(x.m_limited_array);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object arrays_and_sequences that will be copied.
     */
    eProsima_user_DllExport arrays_and_sequences& operator =(
            const arrays_and_sequences& x)
    {

                    m_unlimited_vector = x.m_unlimited_vector;

                    m_limited_vector = x.m_limited_vector;

                    m_limited_array = x.m_limited_array;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object arrays_and_sequences that will be copied.
     */
    eProsima_user_DllExport arrays_and_sequences& operator =(
            arrays_and_sequences&& x) noexcept
    {

        m_unlimited_vector = std::move(x.m_unlimited_vector);
        m_limited_vector = std::move(x.m_limited_vector);
        m_limited_array = std::move(x.m_limited_array);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x arrays_and_sequences object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const arrays_and_sequences& x) const
    {
        return (m_unlimited_vector == x.m_unlimited_vector &&
           m_limited_vector == x.m_limited_vector &&
           m_limited_array == x.m_limited_array);
    }

    /*!
     * @brief Comparison operator.
     * @param x arrays_and_sequences object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const arrays_and_sequences& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function copies the value in member unlimited_vector
     * @param _unlimited_vector New value to be copied in member unlimited_vector
     */
    eProsima_user_DllExport void unlimited_vector(
            const std::vector<AnInternalObject>& _unlimited_vector)
    {
        m_unlimited_vector = _unlimited_vector;
    }

    /*!
     * @brief This function moves the value in member unlimited_vector
     * @param _unlimited_vector New value to be moved in member unlimited_vector
     */
    eProsima_user_DllExport void unlimited_vector(
            std::vector<AnInternalObject>&& _unlimited_vector)
    {
        m_unlimited_vector = std::move(_unlimited_vector);
    }

    /*!
     * @brief This function returns a constant reference to member unlimited_vector
     * @return Constant reference to member unlimited_vector
     */
    eProsima_user_DllExport const std::vector<AnInternalObject>& unlimited_vector() const
    {
        return m_unlimited_vector;
    }

    /*!
     * @brief This function returns a reference to member unlimited_vector
     * @return Reference to member unlimited_vector
     */
    eProsima_user_DllExport std::vector<AnInternalObject>& unlimited_vector()
    {
        return m_unlimited_vector;
    }


    /*!
     * @brief This function copies the value in member limited_vector
     * @param _limited_vector New value to be copied in member limited_vector
     */
    eProsima_user_DllExport void limited_vector(
            const std::vector<AnInternalObject>& _limited_vector)
    {
        m_limited_vector = _limited_vector;
    }

    /*!
     * @brief This function moves the value in member limited_vector
     * @param _limited_vector New value to be moved in member limited_vector
     */
    eProsima_user_DllExport void limited_vector(
            std::vector<AnInternalObject>&& _limited_vector)
    {
        m_limited_vector = std::move(_limited_vector);
    }

    /*!
     * @brief This function returns a constant reference to member limited_vector
     * @return Constant reference to member limited_vector
     */
    eProsima_user_DllExport const std::vector<AnInternalObject>& limited_vector() const
    {
        return m_limited_vector;
    }

    /*!
     * @brief This function returns a reference to member limited_vector
     * @return Reference to member limited_vector
     */
    eProsima_user_DllExport std::vector<AnInternalObject>& limited_vector()
    {
        return m_limited_vector;
    }


    /*!
     * @brief This function copies the value in member limited_array
     * @param _limited_array New value to be copied in member limited_array
     */
    eProsima_user_DllExport void limited_array(
            const std::array<AnInternalObject, 10>& _limited_array)
    {
        m_limited_array = _limited_array;
    }

    /*!
     * @brief This function moves the value in member limited_array
     * @param _limited_array New value to be moved in member limited_array
     */
    eProsima_user_DllExport void limited_array(
            std::array<AnInternalObject, 10>&& _limited_array)
    {
        m_limited_array = std::move(_limited_array);
    }

    /*!
     * @brief This function returns a constant reference to member limited_array
     * @return Constant reference to member limited_array
     */
    eProsima_user_DllExport const std::array<AnInternalObject, 10>& limited_array() const
    {
        return m_limited_array;
    }

    /*!
     * @brief This function returns a reference to member limited_array
     * @return Reference to member limited_array
     */
    eProsima_user_DllExport std::array<AnInternalObject, 10>& limited_array()
    {
        return m_limited_array;
    }



private:

    std::vector<AnInternalObject> m_unlimited_vector;
    std::vector<AnInternalObject> m_limited_vector;
    std::array<AnInternalObject, 10> m_limited_array;

};

#endif // _FAST_DDS_GENERATED_ARRAYS_AND_SEQUENCES_HPP_


